package counter.count;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Count {
	public int count(String string1,String string2){
		int count = 0;
		Pattern pattern  = Pattern.compile(string1);
		Matcher matcher = pattern.matcher(string2);
		while(matcher.find())
			count++;
		return count;
	}
}
